package com.suray.wcs.service.hk.agv.type;

public enum HkAgvTaskReportInfo {
    START("任务开始"),
    ASK_FOR_INTO_START("请求进入取货"),
    GET_CARGO("取货完成"),
    LEAVE_START_POINT("离开取货点"),
    ASK_FOR_INTO_END("请求进入放货"),
    PUT_CARGO("放货完成"),
    LEAVE_END_POINT("离开放货点"),
    ;

    String des;
    HkAgvTaskReportInfo(String des) {
        this.des = des;
    }

    public String getDes() {
        return des;
    }

    public static HkAgvTaskReportInfo parseReport(String des) {
        for (HkAgvTaskReportInfo reportInfo : HkAgvTaskReportInfo.values()) {
            if (reportInfo.des.equals(des)) {
                return reportInfo;
            }
        }

        throw new RuntimeException("任务信息解析失败：" + des);
    }

    @Override
    public String toString() {
        return des;
    }
}
